﻿using AutoMapper;
using GGGK.Film.IService;
using GGGK.Film.Models;
using Microsoft.AspNetCore.Mvc;

namespace GGGK.Film.Api.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class DictTypeController : ControllerBase
    {
        private readonly IDictTypeService svc;
        private readonly IMapper mapper;

        public DictTypeController(IDictTypeService svc, IMapper mapper)
        {
            this.svc = svc;
            this.mapper = mapper;
        }

        /// <summary>
        /// 获取全部
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public Result Get()
        {
            var data = svc.Query(o => o.Status == 1);

            return new Result() { code = 1, msg = "成功", data = data };
        }
    }
}
